<?php

class Jf_View_Helper_RedirectURL extends Jf_View_Helper_Abstract {

    public function redirectURL ($url) {
        $parseUrl = parse_url ($url);
        $dispatcher = Jf_Controller_Dispatcher::getInstance ();
        $httpHost = $dispatcher -> getRequest () -> getHttpHost ();
        if ($parseUrl['host'] === $httpHost) {
            return $url;
        } else {
            header ('404.html');
        }
    }

}
